package spi;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.rpc.Invoker;

/**
 * @author fengbo
 * @version 1.0.0
 * @date 2019/1/10 9:08
 * @since JDK 1.8
 */
public class RobotImpl implements Robot {

    private Autobot autobot;

    public void setAutobot(Autobot autobot) {
        this.autobot = autobot;
    }

    @Override
    public void sayHello1(URL url) {
        autobot.sayHello1(url);
        System.out.println("hello1");
    }

    @Override
    public void sayHello2(Invoker invoker) {
        autobot.sayHello2(invoker);
        System.out.println("hello2");
    }

}
